<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>具名插槽</title>
    <script src="../lib/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">{{meg}}</div>


<script>

    Vue.filter("myfilter2",function (vale,ag1) {


        return ag1 + vale;

    })




    var APP = {

        template: `<div class="main">

      <input type="text" v-model="msg">
      <p>{{msg | myFilter}}</p>
      <h3>{{msg | myfilter2('呵呵呵') }}</h3>



       </div>`,
        data:function () {
            return{
                msg:"邢伟新"
            }
        },
        filters:{

            myFilter:function (vale) {

                return "$" + vale;
            }

        }

    }


    new Vue({
        el: "#app",
        template:`<APP/>`,
        data: function () {

            return {
                meg: "xingweixin"

            }

        },
        components:{

            APP


        }


    })


</script>


</body>
</html>